<template>
	<view class="activity-record" :style="[{paddingTop:statusBar + 'px'}]">
		<view class="status" :style="[{height:statusBar + 'px'}]" ></view>
		<view class="navigation-box" :style="[{top:(statusBar-2) + 'px'}]">
			<view class="navigation" >
				<image src="/static/images/back.png" class="back" @click="back()" mode=""></image>
				<view class="navigation-title">活动记录</view>
			</view>
			<view class="nav">
				<view class="" v-for="(item,index) in tabList" :class="[2==index?'nav-item-num':'nav-item']" :key="index" @click="tabChange(index)">
					<view :class="[tabIndex==index?'tabActive':'tabNormal']" >{{ item.tabName }}</view>
					<view class="bottom-line" v-if="tabIndex==index"></view>
					<view class="hasOrderTips" v-if="countDta&&index==0&&countDta.unpaid>0">{{ countDta.unpaid }}</view>
					<view class="hasOrderTips" v-if="countDta&&index==1&&countDta.pending>0">{{ countDta.pending }}</view>
					<view class="hasOrderNumTips" v-if="countDta&&index==2&&countDta.running>0" :class="[tabIndex==2?'nav-item-num-active':'']" >({{ countDta.running  }})</view>
				</view>
			</view>
		</view>	
		<view class="navigation-position"></view>
		
		<view class="waiting-pay-list" v-if="tabIndex==0&&pageItems.length>0">
			<view class="waiting-pay-item" v-for="(item,index) in pageItems" :key="index" @click="checkSettlementItem(index,item.is_closed)">
				<view class="checkbox" v-if="(!item.is_closed || item.is_closed!=1)&&(!item.is_paying || item.is_paying!=1)">
					<view class="checked" v-if="item.checked&&item.checked">
						<image src="/static/images/choicedicon.png" mode=""></image>
					</view>
					<view class="uncheck" v-else></view>
				</view>
				<view v-else class="checkbox"></view>
				<view class="checkbox" v-if="item.is_closed || item.is_closed==1"></view>	
				<view class="goods-icon-box">
					<image :src="item.product_cover" mode=""></image>
				</view>
				<view class="goods-info">
					<view class="goods-title">{{ item.product_title }}</view>
					<view class="gold-goods-price-area">
						<view>
							<text>权益价</text>
							<text>￥{{ item.pay_net_price }}</text>
						</view>
						<view>
							<text>抢购金</text>
							<text>￥{{ item.pay_cash_price }}</text>
						</view>
					</view>
					<view class="goods-pay">
						<view class="goods-price">
							<text>￥</text>
							<text>{{ item.record_all_price }}</text>
						</view>
					</view>	
				</view>
				<view class="waiting-pay-item-bottom" v-if="!item.is_closed || item.is_closed!=1" >
					<view class="count-down-time" v-if="item.end_times" >
						<text>剩余</text>
						<uni-countdown :show-day="false" :hour="item.end_times.h" :minute="item.end_times.m" :second="item.end_times.s"  color="#FE3F34" splitorColor="#FE3F34"></uni-countdown>
					</view>
					<view class="pay-btn" @click.stop="payNow(item.cid,item.gold_product_is_last_round,item.pay_gold_beans,item.gold_product_all_price_next)" v-if="(!item.is_paying || item.is_paying!=1 )&&(!item.is_paid ||item.is_paid!=1)&&(item.is_record_made==1 || item.is_record_made==true)">立即支付</view>	
					<view class="pay-btn paying-btn" v-if="item.is_paying || item.is_paying==1">正在付款中</view>
					<view class="pay-btn paying-btn pay-making-btn" v-if="item.is_record_making==1 || item.is_record_making==true">平台垫付中···</view>
					
				</view>
				<view class="waiting-pay-item-bottom" v-else>
					<view class="pay-time-out">未在规定时间内支付</view>
					<view class="delete-btn" @click.stop="goldRecordDeleting(item.cid)">删除</view>	
				</view>
			</view>
			<view class="settlement-bar" v-if="pageItems.length>0">
				<view class="check-all" @click="onSelectAll()">
					<view class="check-all-box">
						<view class="checked-all" v-if="isAllChecked">
							<image src="/static/images/choicedicon.png" mode=""></image>
						</view>
						<view class="unchecked-all" v-else></view>	
					</view>
					<view class="check-all-text" v-if="!isAllChecked">全选</view>	
					<view class="check-all-text" v-if="isAllChecked">已选({{ records.length }})</view>	
				</view>
				<view class="settlement-pay">
					<view class="settlement-pay-money">
						<view>
							<text>权益价:</text>
							<text>￥</text>
							<text>{{ totalMoney==0?'0.00':totalMoney }}</text>
						</view>
						<view>
							<text>抢购金:</text>
							<text>￥</text>
							<text>{{ totalGoldCashMoney==0?'0.00':totalGoldCashMoney }}</text>
						</view>
					</view>
					<view class="settlement-pay-btn" @click="goldProductBatchPaying()" >结算</view>	
				</view>	
			</view>	
		</view>
		
		<view class="waiting-handle-list" v-if="tabIndex==1&&pageItems.length>0" >
			<view class="waiting-handle-item" v-for="(item,index) in pageItems" :key="index" >
				<view class="pay-time">
					<text>下单时间：</text>
					<text>{{ item.created_at }}</text>
				</view>
				<view class="waiting-handle-goods-info" @click="checkWaitingHandleItem(index)">
					<view class="checkbox" v-if="(!item.gold_product_is_last_round || item.gold_product_is_last_round!=1)&&item.is_resell_applying!=1 && item.is_take_applying!=1">
						<view class="checked" v-if="item.checked">
							<image src="/static/images/choicedicon.png" mode=""></image>
						</view>
						<view class="uncheck" v-else></view>
					</view>
					<view class="checkbox" v-else></view>
					<view class="goods-icon-box goods-icon-box1">
						<image :src="item.product_cover" mode=""></image>
					</view>
					<view class="goods-right">
						<view class="activity-goods-title activity-goods-title1">{{ item.product_title }}</view>	
						<view class="gold-goods-price-area">
							<view>
								<text>权益价</text>
								<text>￥{{ item.pay_net_price }}</text>
							</view>
							<view>
								<text>抢购金</text>
								<text>￥{{ item.pay_cash_price }}</text>
							</view>
						</view>
						<view class="goods-price">
							<!-- <text>VIP价</text>	 -->
							<text>￥</text>
							<text>{{ item.record_all_price }}</text>
							<!-- <image src="/static/images/vip-price-icon.png" mode=""></image> -->
						</view>
						<view class="goods-operation-btn-box">
							<view class="send-out-goods" @click.stop="goOrderConfirm(item,item.gold_product_is_last_round)" v-if="(!item.gold_product_is_last_round || item.gold_product_is_last_round!=1)&&(item.is_paid || item.is_paid==1)&&(!item.is_take_applying || item.is_take_applying!=1)&&(!item.is_resell_applying || item.is_resell_applying!=1)" >发货</view>
							<view class="send-out-goods sended-out-goods"  v-if="(!item.gold_product_is_last_round || item.gold_product_is_last_round!=1)&&(item.is_paid || item.is_paid==1)&&(item.is_take_applying || item.is_take_applying==1)" >正在处理中</view>
							<view class="send-out-goods" @click.stop="goOrderConfirm(item,item.gold_product_is_last_round)" v-if="(item.gold_product_is_last_round || item.gold_product_is_last_round==1)&&(!item.has_applied_to_take || item.has_applied_to_take!=1)&&(item.is_paid || item.is_paid==1)&&(!item.is_take_applying || item.is_take_applying!=1)&&(!item.is_resell_applying || item.is_resell_applying!=1)&&(!item.is_split_applying || item.is_split_applying!=1)&&(!item.has_applied_to_split || item.has_applied_to_split!=1)" >发货</view>
							<view class="send-out-goods sended-out-goods"  v-if="(item.has_applied_to_take || item.has_applied_to_take==1)&&(item.gold_product_is_last_round || item.gold_product_is_last_round==1)&&(item.is_paid || item.is_paid==1)&&(!item.is_take_applying || item.is_take_applying!=1)" >已申请发货</view>
							<view class="send-out-goods sended-out-goods"  v-if="(!item.has_applied_to_take || item.has_applied_to_take!=1)&&(item.gold_product_is_last_round || item.gold_product_is_last_round==1)&&(item.is_paid || item.is_paid==1)&&(item.is_take_applying || item.is_take_applying==1)" >正在处理中</view>
							
							<view class="sell-again" @click.stop="resellNow(item.cid,item.pay_gold_beans,item.gold_product_all_price_next)" v-if="(!item.gold_product_is_last_round || item.gold_product_is_last_round!=1)&&(item.is_paid || item.is_paid==1)&&(!item.is_resell_applying || item.is_resell_applying!=1)&&(!item.is_take_applying || item.is_take_applying!=1)" >寄售</view>
							<view class="sell-again selled-again" v-if="(!item.gold_product_is_last_round || item.gold_product_is_last_round!=1)&&(item.is_paid || item.is_paid==1)&&(item.is_resell_applying || item.is_resell_applying==1)">正在处理中</view>
							
							<view class="apply-excess-return" @click="goldProductSplitting(item.cid,item.pay_gold_beans,item.splits_all_money)" v-if="(item.gold_product_is_last_round || item.gold_product_is_last_round==1)&&(item.is_paid || item.is_paid==1)&&(!item.is_split_applying || item.is_split_applying!=1)&&(!item.has_applied_to_split || item.has_applied_to_split!=1)&&(!item.is_take_applying || item.is_take_applying!=1)">申请超额返</view>
							<view class="apply-excess-return applyed-excess-return" v-if="(item.gold_product_is_last_round || item.gold_product_is_last_round==1)&&(item.is_paid || item.is_paid==1)&&(item.is_split_applying || item.is_split_applying==1)">正在处理中</view>
							<view class="apply-excess-return applyed-excess-return" v-if="(item.gold_product_is_last_round || item.gold_product_is_last_round==1)&&(item.is_paid || item.is_paid==1)&&(!item.is_split_applying || item.is_split_applying!=1)&&(item.has_applied_to_split==1 || item.has_applied_to_split)">已申请超额返</view>
						
						</view>	
					</view>	
				</view>	
			</view>			
			
			<view class="settlement-bar" v-if="pageItems.length>0">
				<view class="check-all" @click="onSelectAllWaitingHandle()" >
					<view class="check-all-box">
						<view class="checked-all" v-if="isWaitingAllChecked">
							<image src="/static/images/choicedicon.png" mode=""></image>
						</view>
						<view class="unchecked-all" v-else></view>	
					</view>
					<view class="check-all-text" v-if="!isWaitingAllChecked">全选</view>	
					<view class="check-all-text" v-else>已选({{ records.length }})</view>	
					
				</view>
				<view class="settlement-pay">
					<view class="settlement-pay-btn" @click="goldProductBatchReselling()" >寄售</view>	
				</view>	
			</view>
			
		</view>
		<view class="selling-list" v-if="tabIndex==2&&pageItems.length>0">
			<view class="selling-item" v-for="(item,index) in pageItems" :key="index">
				<view class="pay-time" >
					<text>下单时间：</text>
					<text>{{ item.created_at }}</text>
				</view>
				<view class="pay-time order-time" v-if="(item.has_applied_to_resell || item.has_applied_to_resell==1)&&item.next_resell_at">
					<text>上架时间：</text>
					<text>{{ item.next_resell_at }}</text>
				</view>
				<view class="pay-time order-time" v-if="(item.has_applied_to_split || item.has_applied_to_split==1)&&item.next_resell_at">
					<text>拆单时间：</text>
					<text>{{ item.next_resell_at }}</text>
				</view>
				<view class="pay-time order-time" v-if="(!item.has_applied_to_split || item.has_applied_to_split!=1)&&(item.has_applied_to_take || item.has_applied_to_take==1)">
					<text>申请发货时间：</text>
					<text>{{ item.to_take_applied_at }}</text>
				</view>
				<view class="selling-goods-info">
					<view class="goods-icon-box">
						<image :src="item.product_cover" mode=""></image>
					</view>
					<view class="goods-right">
						<view class="activity-goods-title">{{ item.product_title }}</view>	
						<view class="gold-goods-price-area">
							<view>
								<text>权益价</text>
								<text>￥{{ item.pay_net_price }}</text>
							</view>
							<view>
								<text>抢购金</text>
								<text>￥{{ item.pay_cash_price }}</text>
							</view>
						</view>
						<view class="buy-price" v-if="item.has_applied_to_split==false || item.has_applied_to_split==0 || item.has_applied_to_split==''">
							<text>购买价格</text>
							<text>￥</text>
							<text>{{ item.record_all_price }}</text>
						</view>
						
						<view class="sell-price" v-if="item.has_applied_to_split || item.has_applied_to_split==1">
							<text>拆单总价</text>
							<text>￥</text>
							<text>{{ item.splits_all_money }}</text>
							<text>共{{ item.splits_all_count }}单</text>
							<!-- <text>超额返金额</text>
							<text>￥</text>
							<text>{{ item.splits_all_money }}</text> -->
						</view>
						<view class="sell-price" v-if="item.has_applied_to_resell || item.has_applied_to_resell==1">
							<text>寄售价格</text>
							<text>￥</text>
							<text>{{ item.resell_all_price }}</text>
						</view>
					</view>	
				</view>	
			</view>	
		</view>
		<view class="paid-list" v-if="tabIndex==3&&pageItems.length>0">
			<view class="paid-item" v-for="(item,index) in pageItems" :key="index">
				<view class="pay-time">
					<text>下单时间：</text>
					<text>{{ item.created_at }}</text>
				</view>
				<view class="pay-time order-time" v-if="item.has_applied_to_split || item.has_applied_to_split==1">
					<text>拆单时间：</text>
					<text>{{ item.next_resell_at }}</text>
				</view>
				<view class="pay-time order-time" v-if="(!item.has_applied_to_split || item.has_applied_to_split!=1)&&(item.has_applied_to_take || item.has_applied_to_take==1)">
					
					<text>申请发货时间：</text>
					<text>{{ item.to_take_applied_at }}</text>
				</view>
				<view class="paid-goods-info">
					<view class="goods-icon-box">
						<image :src="item.product_cover" mode=""></image>
					</view>
					<view class="goods-right">
						<view class="activity-goods-title ">{{ item.product_title }}</view>	
						<view class="gold-goods-price-area">
							<view>
								<text>权益价</text>
								<text>￥{{ item.pay_net_price }}</text>
							</view>
							<view>
								<text>抢购金</text>
								<text>￥{{ item.pay_cash_price }}</text>
							</view>
						</view>
						
						<view class="buy-price" v-if="item.has_applied_to_split==false || item.has_applied_to_split==0 || item.has_applied_to_split==''">
							<text>购买价格</text>
							<text>￥</text>
							<text>{{ item.record_all_price }}</text>
						</view>
						<view class="sell-price" v-if="item.has_applied_to_split || item.has_applied_to_split==1">
							<text>拆单总价</text>
							<text>￥</text>
							<text>{{ item.splits_all_money }}</text>
							<text>共{{ item.splits_all_count }}单</text>
						</view>
						<view class="sell-price" v-if="item.has_applied_to_resell || item.has_applied_to_resell==1">
							<text>寄售价格</text>
							<text>￥</text>
							<text>{{ item.resell_all_price }}</text>
						</view>
					</view>	
				</view>	
			</view>	
		</view>
		<view class="no-more" v-if="pageHasNoMore&&pageItems.length!=0" >
		  --- 没有更多数据了 ---
		</view>
		<view class="nodata-box" v-if="pageItems.length==0">
			<image src="/static/images/nodata-icon.png" mode="" class="nodata-icon"></image>
			<view class="nodata-text">暂无记录</view>
			<view class="nodata-text nodata-text1">请刷新查看</view>
		</view>
		
		<image class="return-top" mode="aspectFit" v-if="isTopButtonShow" @click="returnTop" src="/static/images/return-top.png"></image>
		
	</view>
</template>

<script>
	/* function getRequestParams() {
		
			let url = location.href;
			
			let requestParams = {};
			
			if (url.indexOf('?') !== -1) {
				
				let str = url.substr(url.indexOf('?') + 1);
				
				let strs = str.split('&');
				
				for (let i = 0; i < strs.length; i++) {
					
					requestParams[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
					
				}
				
			}
			
			return requestParams;
			
	}
	let params = getRequestParams();
	
	let token = params['token'];
	
	let status_bar =  params['status_bar'];
	
	let source = 'wap';
	
	if(token!=undefined){
		
		uni.setStorage({ key: 'token',data: token })
		
		source = 'app';
		
	}
	if(status_bar!=undefined){
		
		uni.setStorage({ key: 'status_bar',data: status_bar })
		
	} */
	import store from "store";
	
	import {mapGetters,mapMutations,mapActions} from 'vuex';
	
	import { goldRecordsList,goldProductBatchPaying,goldProductBatchReselling,goldProductReselling,goldRecordDeleting,goldRecordsCount } from "api/goldstormApi.js";
	
	// import Pagination from "mixins/Pagination";
	
	export default {
		store,
		computed:{
			...mapGetters(['user','statusBar','isLogin'])
		},
		// mixins:[ Pagination ],
		data(){
			return {
				isTopButtonShow:false,
				source:source,
				tabList:[
					{
						tabName:'待支付',
						tabtype:'bepaid'
					},
					{
						tabName:'待处理',
						tabtype:'pending'
					},
					{
						tabName:'寄售中',
						tabtype:'saleing'
					},
					{
						tabName:'已完成',
						tabtype:'completed'
					}
				],
				tabIndex:0,
				totalMoney:0,
				totalGoldCashMoney:0,
				reselltotalMoney:0,
				isAllChecked:false,
				isWaitingAllChecked:false,
				slectEdGoodsArr:[],
				slectWtGoodsArr:[],
				records:[],
				paidState:'unpaid',//unpaid, pending, running, finished
				needGoldbeans:0,
				isActivityRecord:true,
				initIndex:0,
				countDta:null,
				
				pageNumber: 1,
				pageMeta: {},
				pageItems: [],
				pageHasNoMore: false,
				timer:null,
				checkAllText:'全选',
				isClick:true
		}
	},
		methods:{
			...mapMutations(['setUser','setStatusBar']),
			back(){
				if(this.source == 'wap'){
					uni.navigateBack()
				}else{
					// window.flutter_inappwebview.callHandler('back_to_app', '')
					backToApp.postMessage('back');
				}
			},
			goldRecordsCount(){
				goldRecordsCount().then(res=>{
					if(!res.message){
						this.countDta = res
					}
				})
			},
			async initPage() {
			    this.pageNumber = 1;
					this.initIndex = 0;
			    this.pageHasNoMore = false
			    this.pageMeta = {}
			    this.pageItems = []
			},
			async loadPageItems() {
				let parms = {
					condition:this.paidState,
					index:this.initIndex
				}
				return await goldRecordsList(parms) 
			},
			async loadPageData() {
			    const response = await this.loadPageItems()					
					if (response) {
						if(response.length>0){
							if (this.initIndex === 0) {
							    this.pageItems = response
							} else {
							    this.pageItems = [...this.pageItems, ...response]
							}
							this.initIndex = this.pageItems.length - 1;
							if(this.initIndex == 0){
								this.pageHasNoMore = true
							}
						}else{
							this.pageHasNoMore = true
						}
						if(this.tabIndex==0){
							if(this.pageItems.length==0){
								if(this.timer) {
									clearTimeout(this.timer);  
									this.timer = null;  
								} 
							}else{
								let list  = this.pageItems;
								let isclear = true;
								list.forEach((ele,index)=>{
									if(ele.is_paying==true || ele.is_paying ==1 || ele.is_take_applying==true || ele.is_take_applying==1 || ele.is_resell_applying==true || ele.is_resell_applying==1 || ele.is_split_applying==1 || ele.is_split_applying==true || ele.is_record_making==1 || ele.is_record_making==true){
										isclear = false
									}	
								})
								if(isclear){
									if(this.timer) {
										clearTimeout(this.timer);
										this.timer = null;  
									}
								}else{
									if(!this.timer){
										this.timer = setInterval(() => {
											this.initPage()
											this.loadPageData().then(res=>{
												if(this.paidState == 'unpaid'){
													this.init()
												}
											})
											this.goldRecordsCount()
										}, 5000)
									}
								}
							}
						}else if(this.tabIndex==1||this.tabIndex==2||this.tabIndex==3){
							let list  = this.pageItems;
							if(this.pageItems.length==0){
								if(this.timer) {  
									clearTimeout(this.timer);  
									this.timer = null;  
								} 
							}else{
								let isclear = true;
								list.forEach((ele,index)=>{
									if(ele.is_take_applying==true || ele.is_take_applying==1 || ele.is_resell_applying==true || ele.is_resell_applying==1 || ele.is_split_applying==1 || ele.is_split_applying==true){
										isclear = false
									}
								})
								if(isclear){
									if(this.timer) {
										clearTimeout(this.timer);
										this.timer = null;  
									}
								}
							}
						}
						if(this.pageItems.length<10){
							this.pageHasNoMore = true
						}
					}
			},
			async goldRecordDeleting(id){
				let res = await goldRecordDeleting(id)
				if(!res.message){
					uni.showModal({ title: '提示', content: '删除成功！', showCancel: false })
				}
				this.pageNumber = 1;
				this.initIndex = 0;
				this.pageHasNoMore = false
				this.records = []
				this.needGoldbeans = 0
				this.totalMoney = 0
				this.isAllChecked = false
				this.isWaitingAllChecked = false
				await this.loadPageData()
				if(this.paidState == 'unpaid'){
					this.init()
				}
			},
			goOrderConfirm(item,isExReturn){//去发货
				uni.navigateTo({
					url:'/packs/pages/activity/activityOrderConfirm?orderDetail=' + encodeURIComponent(JSON.stringify(item)) + '&isExReturn=false' 
				})
			},
			goldProductSplitting(id,needGoldbeans,price){
				let records = []
				records.push(id)
				uni.navigateTo({
					url:'/packs/pages/activity/activitySellConfirm?records=' + encodeURIComponent(JSON.stringify(records)) + '&needGoldbeans=' + needGoldbeans + '&gold_record_id=' + id  +'&isExReturn=true' + '&price=' + price
				})
			},
			goOrderConfirmEmpty(){
				uni.showModal({
				  title: '提示', content: '您已经申请了寄售，不能再申请发货了！', showCancel: false
				})
			},
			goOrderConfirmEmptyResell(){
				uni.showModal({
				  title: '提示', content: '您已经申请了发货，不能再申请寄售了！', showCancel: false
				})
			},
			goOrderConfirmEmptyReturn(){
				uni.showModal({
				  title: '提示', content: '您已经申请了超额返，不能重复申请！', showCancel: false
				})
			},
			async tabChange(index,type){
				this.tabIndex = index;
				if(index==0){
					this.paidState = 'unpaid'
				}else if(index==1){
					this.paidState = 'pending'
				}else if(index==2){
					this.paidState = 'running'
				}else if(index==3){
					this.paidState = 'finished'
				}
				this.pageNumber = 1;
				this.initIndex = 0;
				this.pageHasNoMore = false;
				this.pageItems = [];
				this.records = [];
				this.needGoldbeans = 0;
				this.totalMoney = 0;
				this.totalGoldCashMoney = 0;
				this.isAllChecked = false;
				this.isWaitingAllChecked = false;
				uni.showLoading({ title: '加载中' })
				await this.loadPageData()
				uni.hideLoading()
				if(this.paidState == 'unpaid'){
					this.init()
				}
				this.goldRecordsCount()
			},
			async payNow(id,isExReturnValue,pay_gold_beans,price){//单个支付
				let isExReturn = false;
				if(isExReturnValue == true || isExReturnValue ==1){
					isExReturn = true
				}else{
					isExReturn= false
				}
				let records = []
				records.push(id)
				let parms = {
					records:records
				}
				
				const response =  await goldProductBatchPaying(parms)

				if(response.message){
					if(Object.values(response.errors)[0][0]=='请先绑定支付宝账号'){
						let _this = this
						uni.showModal({
							content:'您还未绑定支付宝账号，请使用App绑定支付宝后可支付！',
							confirmText:'去绑定',
							success: function (res) {
								if (res.confirm) {
									if(_this.statusBar>0){
										// window.flutter_inappwebview.callHandler('bind_alipay_app')
										bindAlipayApp.postMessage('bindali');
									}else{
										uni.navigateTo({url: '/packs/pages/download/download?from=1'})
									}
								}
							}
						})
					}else if(Object.values(response.errors)[0][0]=='请先设置交易密码'){
						if(this.statusBar>0){
							setPayCodeByApp.postMessage('paycodeset');
						}else{
							uni.navigateTo({url: '/packs/pages/userset/setpaycode'})
						}
					}else{
						uni.showModal({
						  title: '提示', content: Object.values(response.errors)[0][0], showCancel: false
						})
					}

					this.pageNumber = 1;
					this.initIndex = 0;
					this.pageHasNoMore = false
					this.records = []
					this.totalMoney = 0
					this.totalGoldCashMoney = 0
					this.isAllChecked = false
					this.isWaitingAllChecked = false
					await this.loadPageData()
					if(this.paidState == 'unpaid'){
						this.init()
					}
				}else{
					if(!response.message){
						uni.navigateTo({
							url:'/packs/pages/activity/activityPaid?isExReturn=' + isExReturn + '&records=' + encodeURIComponent(JSON.stringify(records)) + '&needGoldbeans=' + pay_gold_beans + '&price=' + price
						})
					}
				}
				// this.goldRecordsCount()
			},
			async goldProductBatchPaying(){//批量支付
				if(this.isClick){
					this.isClick = false
					if(this.records.length!=0){
						let parms = { records:this.records }
						const response =  await goldProductBatchPaying(parms)
						
						if(response.message){
							if(Object.values(response.errors)[0][0]=='请先绑定支付宝账号'){
								let _this = this
								uni.showModal({
									content:'您还未绑定支付宝账号，请使用App绑定支付宝后可支付！',
									confirmText:'去绑定',
									success: function (res) {
										if (res.confirm) {
											if(_this.statusBar>0){
												// window.flutter_inappwebview.callHandler('bind_alipay_app')
												bindAlipayApp.postMessage('bindali');
											}else{
												uni.navigateTo({url: '/packs/pages/download/download?form=1'})
											}
										}
									}
								})
							}else if(Object.values(response.errors)[0][0]=='请先设置交易密码'){
								if(this.statusBar>0){
									setPayCodeByApp.postMessage('paycodeset');
								}else{
									uni.navigateTo({url: '/packs/pages/userset/setpaycode'})
								}
							}else{
								uni.showModal({
									title: '提示', content: Object.values(response.errors)[0][0], showCancel: false
								})
							}
							
							this.pageNumber = 1;
							this.initIndex = 0;
							this.pageHasNoMore = false
							this.records = []
							this.totalMoney = 0
							this.totalGoldCashMoney = 0
							this.isAllChecked = false
							this.isWaitingAllChecked = false
							this.isClick = true
							await this.loadPageData()
							if(this.paidState == 'unpaid'){
								this.init()
							}
						}else{
							this.isAllChecked = false
							this.isWaitingAllChecked = false
							this.isClick = true
							if(!response.message){
								uni.navigateTo({
									url:'/packs/pages/activity/activityPaid?records=' + encodeURIComponent(JSON.stringify(this.records)) + '&needGoldbeans=' + this.needGoldbeans + '&price=' + this.reselltotalMoney + '&isBatch=true'
								})
							}
						}
						this.goldRecordsCount()
					}else{
						this.isAllChecked = false
						uni.showModal({
							title:'提示',
							content:'请选择要支付的商品！',
							confirmColor:'#FF6011',
							confirmText:'我知道了',
							showCancel:false
						})
					}
				}
			
				
			},
			async resellNow(id,needGoldbeans,price){ //单个寄售
				let records = []
				records.push(id)
				let goldbeans = needGoldbeans
				uni.navigateTo({
					url:'/packs/pages/activity/activitySellConfirm?records=' + encodeURIComponent(JSON.stringify(records)) + '&needGoldbeans=' + goldbeans + '&isExReturn=false' + '&price=' + price
				})
			},
			async goldProductBatchReselling(){ //批量寄售
				if(this.records.length!=0){
					uni.navigateTo({
						url:'/packs/pages/activity/activitySellConfirm?records=' + encodeURIComponent(JSON.stringify(this.records)) + '&needGoldbeans=' + this.needGoldbeans + '&isExReturn=false' + '&price=' + this.reselltotalMoney
					})
				}else{
					this.isAllChecked = false
					this.isWaitingAllChecked = false
					uni.showModal({
						title:'提示',
						content:'请选择要寄售的商品！',
						confirmColor:'#FF6011',
						confirmText:'我知道了',
						showCancel:false
					})
				}
			},
			checkSettlementItem(index,is_closed){//待支付选中
				if((!is_closed || is_closed!=1)&&(!this.pageItems[index].is_paying || this.pageItems[index].is_paying!=1)&&(this.pageItems[index].is_record_made==1||this.pageItems[index].is_record_made==true)){
					if(this.pageItems[index].checked){
						this.$set(this.pageItems[index], 'checked', false)
						let list = this.records;
						list.forEach((ele,idx)=>{
							if(ele==this.pageItems[index].cid){
								list.splice(idx,1)
							}
						})
						this.records = list;
					}else{
						if(!this.pageItems[index].is_closed || this.pageItems[index].is_closed!=1){
							this.$set(this.pageItems[index], 'checked', true)
							this.records.push(this.pageItems[index].cid)
						}
					}
					let length = this.records.length;
					if(length == this.pageItems.length){
						this.isAllChecked = true
					}else{
						this.isAllChecked = false
					}
					this.countTotalMoney()
				}
			},
			onSelectAll(){ //待支付全选
				this.records = [];
				if(this.isAllChecked){
					this.isAllChecked = false
				}else{
					this.isAllChecked = true
				}
				let list = this.pageItems;
				list.forEach((item,index)=>{
					if(this.isAllChecked){
						if((!item.is_closed || item.is_closed==0) && (!this.pageItems[index].is_paying || this.pageItems[index].is_paying!=1)&&(this.pageItems[index].is_record_made==1||this.pageItems[index].is_record_made==true)){
							item.checked = true
							this.records.push(this.pageItems[index].cid)
						}
					}else{
						item.checked = false
					}
				})
				this.pageItems = list;
				this.countTotalMoney()
			},
			loadingBySelectAll(){
				if(this.isAllChecked){
					this.records = []
					let list = this.pageItems;
					list.forEach((item,index)=>{
						if(this.isAllChecked){
							if((!item.is_closed || item.is_closed==0) && (!this.pageItems[index].is_paying || this.pageItems[index].is_paying!=1)&&(this.pageItems[index].is_record_made==1||this.pageItems[index].is_record_made==true)){
								item.checked = true
								this.records.push(this.pageItems[index].cid)
							}
						}else{
							item.checked = false
						}
					})
					this.pageItems = list;
					this.countTotalMoney()
				}
			},
			checkWaitingHandleItem(index){ //待处理单选
				if((this.pageItems[index].gold_product_is_last_round || this.pageItems[index].gold_product_is_last_round==1)|| this.pageItems[index].is_resell_applying==1 || this.pageItems[index].is_resell_applying || this.pageItems[index].is_take_applying==1 || this.pageItems[index].is_take_applying ){
					return
				}
				
				if(this.pageItems[index].checked){
					this.$set(this.pageItems[index], 'checked', false)
					let list = this.records;
					list.forEach((ele,idx)=>{
						if(ele==this.pageItems[index].cid){
							list.splice(idx,1)
						}
					})
					this.records = list;
				}else{
					this.$set(this.pageItems[index], 'checked', true)
					this.records.push(this.pageItems[index].cid)
				}
				let length = this.records.length;
				if(length == this.pageItems.length){
					this.isWaitingAllChecked = true
				}else{
					this.isWaitingAllChecked = false
				}
				this.countTotalMoney()
				this.$forceUpdate()
			},
			onSelectAllWaitingHandle(){ //待处理全选
				this.records = []
				if(this.isWaitingAllChecked){
					this.isWaitingAllChecked = false
				}else{
					this.isWaitingAllChecked = true
				}
				let list = this.pageItems;
				list.forEach((item,index)=>{
					if(this.isWaitingAllChecked){
						if((!item.gold_product_is_last_round || item.gold_product_is_last_round!=1)&&(!item.is_resell_applying ||item.is_resell_applying!=1) && (!item.is_take_applying||item.is_take_applying!=1)){
							item.checked = true
							this.records.push(this.pageItems[index].cid)
						}
					}else{
						item.checked = false
					}
				})
				this.pageItems = list;
				this.countTotalMoney()
				this.$forceUpdate()
			},
			loadingBySelectAllWaitingHandle(){
				if(this.isWaitingAllChecked){
					this.records = []
					let list = this.pageItems;
					list.forEach((item,index)=>{
						if(this.isWaitingAllChecked){
							if((!item.gold_product_is_last_round || item.gold_product_is_last_round!=1)&&(!item.is_resell_applying ||item.is_resell_applying!=1) && (!item.is_take_applying||item.is_take_applying!=1)){
								item.checked = true
								this.records.push(this.pageItems[index].cid)
							}
						}else{
							item.checked = false
						}
					})
					this.pageItems = list;
					this.countTotalMoney()
				}
			},
			countTotalMoney(){ //计算价格
				let list = this.pageItems;
				let totalMoney = 0;
				let totalGoldCashMoney = 0;
				let needGoldbeans = 0;
				let reselltotalMoney = 0;
				for(let item of list){
					if(item.checked){
						needGoldbeans += Number(item.pay_gold_beans)
						totalMoney += Number(item.pay_net_price)
						totalGoldCashMoney += Number(item.pay_cash_price)
						reselltotalMoney += Number(item.gold_product_all_price_next)
					}
				}
				this.totalMoney = totalMoney.toFixed(2);
				this.totalGoldCashMoney = totalGoldCashMoney.toFixed(2);
				this.needGoldbeans = needGoldbeans.toFixed(2);
				this.reselltotalMoney = reselltotalMoney.toFixed(2);
			},
			init() {
				var date = new Date().getTime();
				let list = this.pageItems;
				list.forEach((item, index) => {
					let end_time = new Date(item.created_at.replace(/-/g, '/')).getTime() + 45*60*1000;
					let leftTime = end_time - date; //计算两日期之间相差的毫秒数
					if (leftTime >= 0) {
						let d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
						let h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
						let m = Math.floor(leftTime / 1000 / 60 % 60);
						let s = Math.floor(leftTime / 1000 % 60);
						item.end_times = { d: d,h: h,m: m,s: s }
					}else{
						item.end_times = { d: 0,h: 0,m: 0,s: 0 }
					}
				})
				this.pageItems = list;
				this.$forceUpdate()
			},
			backEvent(){
				this.pageItems = [];
				// this.tabChange(0)
				this.paidState = 'unpaid';
				this.tabIndex = 0;
				if(!this.timer){
					this.timer = setInterval(() => {
						this.initPage()
						this.loadPageData().then(res=>{
							if(this.paidState == 'unpaid'){
								this.init()
							}
						})
						this.goldRecordsCount()
					}, 5000)
				}else{
					clearTimeout(this.timer);
					this.timer = null; 
					this.timer = setInterval(() => {
						this.initPage()
						this.loadPageData().then(res=>{
							if(this.paidState == 'unpaid'){
								this.init()
							}
						})
						this.goldRecordsCount()
					}, 5000)
				}
			},
			backEventSelling(){
				// this.paidState = 'running';
				// this.tabIndex = 2;
				this.pageItems = [];
				this.paidState = 'pending';
				this.tabIndex = 1;
				if(!this.timer){
					this.timer = setInterval(() => {
						this.initPage()
						this.loadPageData().then(res=>{
							if(this.paidState == 'unpaid'){
								this.init()
							}
						})
						this.goldRecordsCount()
					}, 5000)
				}else{
					clearTimeout(this.timer);
					this.timer = null; 
					this.timer = setInterval(() => {
						this.initPage()
						this.loadPageData().then(res=>{
							if(this.paidState == 'unpaid'){
								this.init()
							}
						})
						this.goldRecordsCount()
					}, 5000)
				}
				setTimeout(()=>{
					uni.pageScrollTo({
						scrollTop: 0,
						duration: 0
					})
				},500)
			},
			returnTop() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 100
				})
			}
		},
		async onShow(){
			if(status_bar!=undefined){ this.setStatusBar(status_bar) }
			this.pageNumber = 1;
			this.initIndex = 0;
			this.pageHasNoMore = false
			this.pageItems = []
			this.records = []
			this.needGoldbeans = 0
			this.totalMoney = 0
			this.isAllChecked = false
			this.isWaitingAllChecked = false
			this.isClick = true
			uni.showLoading({ title: '加载中' })
			if(await this.isLogin ||  await this.statusBar>0){
				this.loadPageData().then(res=>{
					uni.hideLoading()
					if(this.paidState == 'unpaid'){
						this.init()
					}
				})
				this.goldRecordsCount()
			}
		},
		onLoad(options) {
				if(options.tabIndex){
					this.tabIndex = options.tabIndex
					this.tabChange(this.tabIndex)
				}
		},
		onUnload(){
			if(this.timer){
				clearTimeout(this.timer);
				this.timer = null; 
			}
		},
		onPageScroll(e) {
			if (e.scrollTop >= 42) {
				this.isTopButtonShow = true
			} else {
				this.isTopButtonShow = false
			}
		},
		async onPullDownRefresh() {
			await this.initPage()
			await this.loadPageData()
			if(this.isActivityRecord){
				this.records = []
				this.needGoldbeans = 0
				this.totalMoney = 0
				this.isAllChecked = false
				this.isWaitingAllChecked = false
				if(this.paidState == 'unpaid'){
					this.init()
					this.$forceUpdate()
				}
			}
			this.goldRecordsCount()
			uni.stopPullDownRefresh()
		},
		async onReachBottom() {
		    if (this.pageHasNoMore) return
		    this.pageNumber += 1;
		    await this.loadPageData()
				if(this.isActivityRecord){
					if(this.isAllChecked){
						this.loadingBySelectAll()
					}
					if(this.isWaitingAllChecked){
						this.loadingBySelectAllWaitingHandle()
						this.$forceUpdate()
					}
					if(this.paidState == 'unpaid'){
						this.init()
						this.$forceUpdate()
					}
				}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background: #F6F6F6;
	}
	.activity-record{
		width: 100%;
		overflow-x: hidden;
		padding-bottom: 200rpx;
	}
	.status {
		width: 100%;
		position: fixed;
		left:0;
		top: 0;
		z-index: 99;
		background: #F6F6F6;
	}
	.navigation-box{
		width: 100%;
		height: 200rpx;
		position: fixed;
		left:0;
		top:0;
		z-index:99;
	}
	.navigation{
		width: 100%;
		height: 100rpx;
		background: #F6F6F6;
		display: flex;
		align-items: center;
		justify-content: center;
		
	}
	.navigation-position{
		width: 100%;
		height: 200rpx;
		background: rgba(0,0,0,0);
	}
	.back{
		display: block;
		width: 48rpx;
		height: 48rpx;
		position: absolute;
		top: 26rpx;
		left:32rpx;
	}
	.navigation-title{
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}
	.nav{
		display: flex;
		width: 100%;
		height: 20rpx;
		justify-content: center;
		justify-content: space-around;
		padding: 50rpx 0 30rpx 0;
		background:#F6F6F6;
	}
	.nav-item{
		width: 140rpx;
		height: 100%;
		padding-bottom: 26rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position:relative;
	}
	.nav-item-num{
		min-width: 140rpx;
		height: 100%;
		padding-bottom: 26rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position:relative;
	}
	.hasOrderNumTips{
		font-size: 20rpx;
		font-weight: 400;
		color:#999999;
	}
	.nav-item-num-active{
		color:#333333;
		font-weight: 500;
	}
	.tabActive{
		font-size: 28rpx;
		font-weight: 500;
		color:#333333;
	}
	.hasOrderTips{
		width:30rpx;
		height:30rpx;
		background: #EF4034;
		border-radius: 50%;
		position: absolute;
		right:5rpx;
		top:-25rpx;
		font-size: 18rpx;
		color:#ffffff;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.tabNormal{
		font-size: 28rpx;
		font-weight: 400;
		color:#999999;
	}
	.bottom-line{
		width: 48rpx;
		height: 4rpx;
		border-radius:2rpx;
		background:#333333;
		position: absolute;
		bottom: 0;
		left:50%;
		margin-left: -24rpx;
	}
	.waiting-pay-list,.waiting-handle-list,.selling-list,.paid-list{
		margin-top: 30rpx;
	}
	.waiting-pay-item{
		width: 702rpx;
		height: 274rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		display: flex;
		margin:0 auto 20rpx;
		position: relative;
	}
	.waiting-handle-goods-info{
		.checkbox{
			margin-top: 60rpx;
		}
	}
	.checkbox{
		width: 36rpx;
		height: 36rpx;
		margin: 88rpx 24rpx 0 24rpx;
	}
	.uncheck{
		width: 36rpx;
		height: 36rpx;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		border: 2rpx solid #CCCCCC;
	}
	.checked{
		width:44rpx;
		height: 44rpx;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		>image{
			display: block;
			width:100%;
			height:100%;
			border-radius: 50%;
		}
	}
	.goods-icon-box{
		width: 164rpx;
		height: 164rpx;
		margin: 24rpx 0 0 0rpx;
		>image{
			display: block;
			width: 164rpx;
			height: 164rpx;
			border-radius: 12rpx;
		}
	}
	.goods-info{
		height: 100%;
		// width: 406rpx;
	}
	.goods-title{
		width: 406rpx;
		width: 420rpx;
		height: 40rpx;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		overflow: hidden;
		font-size: 28rpx;
		line-height: 40rpx;
		margin: 24rpx 0 0 24rpx;
	}
	.goods-pay{
		width: 406rpx;
		display: flex;
		align-items: center;
		justify-content:flex-end;
		margin:18rpx 0 0 0rpx;
	}
	.goods-price{
		
		>text:nth-child(1){
			font-size: 24rpx;
			margin-top: 14rpx;
			color:#333333;
		}
		>text:nth-child(2){
			font-size: 44rpx;
			font-weight: 500;
			color:#333333;
		}
	}
	.gold-goods-price-area{
		display: flex;
		font-size: 22rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #999999;
		line-height: 34rpx;
		height: 32rpx;
		margin:8rpx 0 0 24rpx;
		>view{
			>text:nth-child(2){
				// font-family: DINAlternate-Bold, DINAlternate;
				// font-weight: bold;
			}
		}
		>view:nth-child(1){
			margin-right: 15rpx;
			color: #FF4924;
		}
	}
	.pay-btn{
		width: 160rpx;
		height: 60rpx;
		background: #EF4034;
		border-radius: 38rpx;
		font-size: 24rpx;
		color:#ffffff;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: 600;
	}
	.paying-btn{
		background: #CCCCCC;
		color: #ffffff;
		border:none;
		
	}
	.pay-making-btn{
		width: 200rpx;
	}
	.waiting-pay-item-bottom{
		// width: 406rpx;
		min-width:406rpx;
		height: 60rpx;
		display: flex;
		justify-content: space-between;
		position: absolute;
		bottom:24rpx;
		right: 24rpx;
	}
	// .count-down-time-box{
	// 	position: absolute;
	// 	bottom:20rpx;
	// 	right: 30rpx;
	// }
	.count-down-time{
		display: flex;
		align-items: center;
		font-size: 26rpx;
		>text{
			font-size: 26rpx;
		}
	}
	.pay-time-out{
		color: #EF4034;
		font-size: 24rpx;
		display: flex;
		align-items: center;
	}
	.delete-btn{
		width: 160rpx;
		height: 60rpx;
		border-radius: 38px;
		border: 1rpx solid #999999;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 24rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #333333;
	}
	/deep/.count-down-time .uni-countdown__splitor{
		margin:0rpx!important;
	}
	/deep/.count-down-time .uni-countdown__number{
		// width:62rpx!important;
		// height: 52rpx!important;
		font-size:28rpx!important;
		// display: flex;
		// align-items: center;
		// justify-content: center;
	}
	.settlement-bar{
		width: 100%;
		height: 100rpx;
		position: fixed;
		display: flex;
		justify-content: space-between;
		align-items: center;
		left:0;
		bottom: 0;
		background: #ffffff;
		padding-bottom: constant(safe-area-inset-bottom); // 兼容 IOS<11.2/
		padding-bottom: env(safe-area-inset-bottom); // 兼容 IOS>11.2/
	}
	.check-all{
		display: flex;
		align-items: center;
	}
	.check-all-box{
		width: 42rpx;
		height: 42rpx;
		border-radius: 50%;
		// border:2rpx solid #CCCCCC;
		margin:0 10rpx 0 30rpx;
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.checked-all{
		width: 40rpx;
		height: 40rpx;
		border-radius: 50%;
		position: absolute;
		left:0;
		top:0;
		display: flex;
		align-items: center;
		justify-content: center;
		>image{
			display: block;
			width: 100%;
			height: 100%;
		}
	}
	.unchecked-all{
		width: 36rpx;
		height: 36rpx;
		border-radius: 50%;
		border:2rpx solid #CCCCCC;
		position: absolute;
		left:0;
		top:0;
	}
	.check-all-text{
		font-size: 24rpx;
		color: #999999;
	}
	.settlement-pay-money{
		>view:nth-child(1){
			display: flex;
			font-size: 24rpx;
			// >text:nth-child(1){
			// 	font-size: 24rpx;
			// 	font-weight: 400;
			// 	color: #333333;
			// 	margin-top: 12rpx;
			// }
			// >text:nth-child(2){
			// 	font-size: 24rpx;
			// 	font-weight: 400;
			// 	color: #FF4924;
			// 	margin-top: 10rpx;
			// }
			// >text:nth-child(3){
			// 	font-size: 40rpx;
			// 	font-weight: 400;
			// 	color: #FF4924;
			// }
			
			>text:nth-child(1){
				font-size: 24rpx;
				font-weight: 400;
				color: #333333;
				margin-top: 12rpx;
				margin-top: 6rpx;
			}
			>text:nth-child(2){
				font-size: 24rpx;
				font-weight: 400;
				color: #FF4924;
				margin-top: 6rpx;
			}
			>text:nth-child(3){
				font-size: 32rpx;
				font-weight: 400;
				color: #FF4924;
			}
		}
		>view:nth-child(2){
			display: flex;
			font-size: 24rpx;
			// >text:nth-child(1){
			// 	font-size: 24rpx;
			// 	font-weight: 400;
			// 	color: #333333;
			// 	margin-top: 12rpx;
			// }
			// >text:nth-child(2){
			// 	font-size: 24rpx;
			// 	font-weight: 400;
			// 	color: #FF4924;
			// 	margin-top: 10rpx;
			// }
			// >text:nth-child(3){
			// 	font-size: 40rpx;
			// 	font-weight: 400;
			// 	color: #FF4924;
			// }
			
			>text:nth-child(1){
				font-size: 24rpx;
				font-weight: 400;
				color: #999999;
				margin-top: 12rpx;
				margin-top: 6rpx;
			}
			>text:nth-child(2){
				font-size: 24rpx;
				font-weight: 400;
				color: #999999;
				margin-top: 6rpx;
			}
			>text:nth-child(3){
				font-size: 32rpx;
				font-weight: 400;
				color: #999999;
			}
		}
		
	}
	.settlement-pay{
		display: flex;
		align-items: center;
	}
	.settlement-pay-btn{
		width: 224rpx;
		height: 72rpx;
		background: linear-gradient(90deg, #FED419 0%, #FFBC1F 100%);
		border-radius: 40rpx;
		font-size: 28rpx;
		font-weight: 600;
		color:#333333;
		display: flex;
		align-items: center;
		justify-content:center;
		margin: 0 24rpx 0 24rpx;
	}
	.waiting-handle-item,.selling-item,.paid-item{
		width: 702rpx;
		// height: 342rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		margin:0 auto 20rpx;
		position: relative;
		padding-bottom: 24rpx;
	}
	.pay-time{
		padding-top: 24rpx;
		margin-left:24rpx;
		font-size: 24rpx;
		color: #999999;
		position: relative;
	}
	.order-time{
		padding-top:15rpx;
	}
	.pay-state{
		font-size: 24rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FF4924;
		line-height: 34rpx;
		position: absolute;
		right: 24rpx;
		top:24rpx;
	}
	.waiting-handle-goods-info{
		display: flex;
		margin-top: 24rpx;
		.goods-icon-box{
			width:164rpx;
			height:164rpx;
			border-radius: 12rpx;
			margin: 0 24rpx 0 24rpx;
		}
		.goods-icon-box1{
			margin-left: 0rpx;
		}
		.goods-right{
			.activity-goods-title{
				font-size: 28rpx;
				line-height: 40rpx;
				color:#333333;
				height: 40rpx;
				width: 466rpx;
				display: -webkit-box;
				-webkit-box-orient:vertical;
				-webkit-line-clamp: 1;
				overflow: hidden;
			}
			.activity-goods-title1{
				width: 420rpx;
			}
			.gold-goods-price-area{
				display: flex;
				font-size: 22rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #999999;
				line-height: 34rpx;
				height: 32rpx;
				margin:8rpx 0 0 0rpx;
				>view{
					>text:nth-child(2){
						// font-family: DINAlternate-Bold, DINAlternate;
						// font-weight: bold;
					}
				}
				>view:nth-child(1){
					margin-right: 15rpx;
					color: #FF4924;
				}
			}
			.goods-price{
				display: flex;
				justify-content: flex-end;
				margin-top: 20rpx;
				>text:nth-child(1){
					font-size: 24rpx;
					margin: 20rpx 5rpx 0 8rpx;
					color:#333333;
				}
				>text:nth-child(2){
					font-size: 44rpx;
					font-weight: 500;
					color:#333333;
				}
				>image{
					display: block;
					width: 68rpx;
					height: 28rpx;
					margin: 16rpx 0 0 12rpx;
				}
			}
		}
	}
	.selling-goods-info,.paid-goods-info{
		display: flex;
		margin-top: 24rpx;
		.goods-icon-box{
			width:164rpx;
			height: 164rpx;
			border-radius: 12rpx;
			margin: 0 24rpx 0 24rpx;
			>image{
				display: block;
				width: 100%;
				height: 100%;
			}
		}
		.goods-right{
			.activity-goods-title{
				font-size: 28rpx;
				height: 40rpx;
				width: 466rpx;
				display: -webkit-box;
				-webkit-box-orient:vertical;
				-webkit-line-clamp: 1;
				overflow: hidden;
			}
			.gold-goods-price-area{
				display: flex;
				font-size: 26rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #999999;
				line-height: 34rpx;
				height: 32rpx;
				margin:8rpx 0 0 0rpx;
				>view{
					>text:nth-child(2){
						font-family: DINAlternate-Bold, DINAlternate;
						font-weight: bold;
					}
				}
				>view:nth-child(1){
					margin-right: 32rpx;
					color: #999999;
				}
			}
			.buy-price{
				display: flex;
				margin-top: 10rpx;
				>text:nth-child(1){
					font-size: 24rpx;
					line-height: 24rpx;
					font-family: PingFangSC-Semibold, PingFang SC;
					font-weight: 600;
					color: #333333;
					margin-top: 18rpx;
				}
				>text:nth-child(2){
					margin-top: 18rpx;
					font-size:24rpx;
					line-height: 24rpx;
					font-weight: 400;
					color:#333333;
				}
				>text:nth-child(3){
					font-size:36rpx;
					font-weight: 500;
					color:#333333;
				}
			}
			.sell-price{
				display: flex;
				margin-top: 0rpx;
				>text:nth-child(1){
					font-size: 24rpx;
					line-height: 24rpx;
					font-family: PingFangSC-Semibold, PingFang SC;
					font-weight: 600;
					color: #FF4924;
					margin-top: 18rpx;
				}
				>text:nth-child(2){
					margin-top: 18rpx;
					font-size:24rpx;
					line-height: 24rpx;
					font-weight: 400;
					color:#FF4924;
				}
				>text:nth-child(3){
					font-size:36rpx;
					font-weight: 500;
					color:#FF4924;
				}
				>text:nth-child(4){
					font-size: 24rpx;
					line-height: 24rpx;
					font-family: PingFangSC-Semibold, PingFang SC;
					font-weight: 600;
					color: #FF4924;
					margin-top: 18rpx;
					margin-left: 30rpx;
				}
			}
			.sell-num{
				>text:nth-child(2){
					margin-top: 18rpx;
					font-size:28rpx;
					line-height: 24rpx;
					font-weight: 400;
					color:#FF4924;
					margin:18rpx 8rpx 0 8rpx;
					font-weight: 600;
				}
				>text:nth-child(3){
					font-size: 24rpx;
					line-height: 24rpx;
					font-family: PingFangSC-Semibold, PingFang SC;
					font-weight: 600;
					color: #FF4924;
					margin-top: 18rpx;
				}
			}
			.selling-text,.paid-text{
				font-size: 30rpx;
				font-weight: 500;
				color:#FF4924;
				position: absolute;
				bottom:35rpx;
				right:35rpx;
			}
		}
		
	}
	.goods-operation-btn-box{
		display: flex;
		justify-content: flex-end;
		margin-top: 16rpx;
		>view{
			min-width: 158rpx;
			height: 58rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 24rpx;
			color:#EF4034;
			border: 2rpx solid #EF4034;
			border-radius: 38rpx;
		}
		.sell-again,.apply-excess-return{
			color:#ffffff;
			background: #EF4034;
			margin-left: 24rpx;
		}
		.sended-out-goods,.selled-again,.applyed-excess-return{
			background: #CCCCCC;
			color: #ffffff;
			border:none;
			min-width: 175rpx;
			margin-left: 24rpx;
			padding: 0 15rpx;
		}
		
	}
	
	.no-more{
		text-align: center;
		font-size: 26rpx;
		color:#999999;
		margin-top: 30rpx;
	}
	
	.nodata{
		width: 100%;
		height: 50rpx;
		position: absolute;
		left:0;
		top:0;
		right:0;
		bottom:0;
		margin:auto;
	}
	.nodata-box{
		width: 100%;
		height: 390rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		position: absolute;
		left:0;
		right: 0;
		top:0;
		bottom: 0;
		margin: auto;
	}
	.nodata-icon{
		display: block;
		width: 320rpx;
		height: 320rpx;
	}
	.nodata-text{
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #666666;
		line-height: 36rpx;
	}
	.nodata-text1{
		margin-top: 15rpx;
	}
	.return-top {
		width: 96rpx;
		height: 96rpx;
		position: fixed;
		bottom: 280rpx;
		right: 32rpx;
	}
</style>